package com.scientificInfo.dao;

import com.scientificInfo.bean.TakeMeeting;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TakeMeetingMapper {

    @Select("select* from takemeeting where meetingid = #{meetingid} AND teacherId = #{teacherId}")
    TakeMeeting selectOne(@Param("meetingid") Integer meetingid, @Param("teacherId") String teacherId);

    @Insert("insert into takemeeting(meetingid, teacherId) values (#{meetingid},#{teacherId})")
    int insertOne(@Param("meetingid") Integer meetingid, @Param("teacherId") String teacherId);

    @Select("select* from takemeeting where meetingid = #{meetingid}")
    List<TakeMeeting> selectByMeetingId(@Param("meetingid") Integer meetingid);
}
